# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
pkgname=avr-libc-git
_avrlibc_pkgver=2.1.0
pkgver=0_git20240218
_commit=22d588c80066102993263018d5324d1424c13f0d
provides=avrlibc=$_avrlibc_pkgver
pkgrel=4
pkgdesc="The C runtime library for the AVR family of microcontrollers - git version"
url="https://github.com/avrdudes/avr-libc"
depends="gcc-avr"
makedepends="
	autoconf
	automake
	python3
	"
arch="x86_64 ppc64le aarch64 x86"
license="BSD-3-Clause"
subpackages="$pkgname-doc"
builddir="$srcdir/$pkgname-$pkgname-${pkgver//./_}-release"
source="
	avr-libc-$_commit.tar.gz::https://github.com/avrdudes/avr-libc/archive/$_commit.tar.gz
	"
builddir="$srcdir/avr-libc-$_commit"

build() {
	./bootstrap
	CC=avr-gcc ./configure \
		--build="$(/bin/sh config.guess)" \
		--host=avr \
		--prefix=/usr
	make
}

package() {
	make install DESTDIR="$pkgdir"
}

sha512sums="
6c1651250cd3fb7b9207c6566b869f8203c17bfb9ffca0a55f3ec28fbed880b23123b3ecf56bbf54605dacfb0ca20906433d7f89cc966e145b126f2437ab7495  avr-libc-22d588c80066102993263018d5324d1424c13f0d.tar.gz
"
